home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / octa209s.zip / octave-2.09 / README.OS2 < prev    next >
Text File  |  1997-08-22  |  13KB  |  380 lines

  1. Octave -- a high-level language for numerical computations.
  2.  
  3.  
  4.  
  5. Overview
  6. --------
  7.  
  8. Octave is a high-level language, primarily intended for numerical
  9. computations.  It provides a convenient command line interface for
  10. solving linear and nonlinear problems numerically.
  11.  
  12. Octave is free software; you can redistribute it and/or modify it
  13. under the terms of the GNU General Public License as published by the
  14. Free Software Foundation; either version 2, or (at your option) any
  15. later version.
  16.  
  17. Octave is distributed in the hope that it will be useful, but WITHOUT
  18. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  19. FITNESS FOR A PARTICULAR PURPOSE.  See the file COPYING for more
  20. details.
  21.  
  22.  
  23.  
  24. Used Compiler and Libraries
  25. ---------------------------
  26.  
  27. Octave for OS/2 is compiled using EMX-GCC 0.9C (with EMXFIX03) and
  28. libg++ 2.7.2.
  29.  
  30. The fortran routines are translated to C using f2c.
  31.  
  32.  
  33.  
  34. Binary Distribution
  35. -------------------
  36.  
  37. Why a binary distribution?
  38.  
  39. 1. There are only minor changes made in the source files of octave. The main
  40.    job was patching stdcpp, info, kpathsea and readline.
  41.  
  42. 2. octave is big (40 MB with the source, object files and libraries) and it
  43.    takes time to compile the program. (ca. 50 minutes on my
  44.    133 MHz Pentium-Overdrive system = ca. 8 hours on a 486DX-33).
  45.  
  46.  
  47.  
  48. Files
  49. -----
  50.  
  51. The files BUGS, CHANGELO, CHANGELO.1, COPYING, NEWS, NEWS.1, PROJECTS, README,
  52. ROADMAP, SENDING.PAT and THANKS are part of the octave 2.09 source code.
  53.  
  54. In the zip file scripts.zip are the scripts coming with octave 2.09.
  55. The installation script will unzip the correct set of script files for
  56. your file system.
  57.  
  58. The files COPYING.EMX, emx.dll, emxlibcs.dll and termcap.dat are part of the
  59. emx 0.9c package  (with EMXFIX03 applied, see COPYING.EMX).
  60.  
  61. octave.exe and octave.ico are the executable and the icon of the main program.
  62. The file octave.exe must no longer be build by the install program!
  63.  
  64. info.exe is the standalone info browser coming with EMX. It was recompiled
  65. so that info.exe and octave.exe uses the same DLL (gnuinfo.dll). And it is
  66. patched so that info.exe accepts the '--index-search' option.
  67.  
  68. gnuview.exe is a replacement for info.exe: It accepts the same command
  69. line option, but it starts OS/2s view.exe.
  70.  
  71. mkfifo.exe is the utility for creating, removing and listing named pipes. It
  72. starts the program nmpserv.exe, if neccessary.
  73.  
  74. The program oct-view.exe is used for starting the image viewer.
  75.  
  76. README.OS2 is the file you are reading.
  77.  
  78. In the directory 'lisp' you find the elisp files (and the compiled elisp files)
  79. you need to run Octave in an Emacs subshell and the files for editing script
  80. files or temporary files of octave using the Emacs editor.
  81.  
  82. In the directory 'doc' you can find the documentation in dvi, postscript,
  83. and also the info files and the INF files.
  84.  
  85. In the directory 'dll' you can find the Dynamic Link Libraries of octave and
  86. emx, and the file termcap.dat is in the directory etc.
  87.  
  88. All files you need for using the dynamic loading in Octave for loading your
  89. own C++ routines into Octave are in 'dlfcn' and its subdirectories.
  90.  
  91.  
  92.  
  93. Other Files of Interest
  94. -----------------------
  95.  
  96.  
  97. octa205b.zip or octave-2.09-b??.zip:
  98.                The binary distribution of Octave-2.09.
  99. octa205p.zip or octave-2.09-p??.zip:
  100.                This archive contains always the update to the newest build.
  101. octa205s.zip or octave-2.09-s??.zip:
  102.                The patched source code for octave (including info, kpathsea,
  103.                iostream, readline and pnm).
  104.  
  105. You need also the following packages. They are available on ftp.cdrom.com,
  106. hobbes.nmsu.edu and wotan.ikp.physik.th-darmstadt.de. less and gnufutil
  107. should be also on ftp.uni-stuttgart.de and ftp.leo.org, and the gnuplot
  108. beta on cmpc1.phys.soton.ac.uk.
  109.  
  110. less252-2.zip: The less pager ported by Kai Uwe Rommel.
  111.                (I know there is a newer version, but i forgot the number :-))
  112. gp315os2b.zip: GNUPLOT 3.6 (beta 315)
  113. gnufutil.zip : The GNU file utilities.
  114. pmvu93.zip   : PM View 0.93.
  115.  
  116.  
  117. Updating to the most recent build level
  118. ---------------------------------------
  119.  
  120. 1. First you must install Octave. See Installation below.
  121. 2. Unzip the patches into the directory you have Octave/2 installed in.
  122. 3. Change into that directory and type 'updt-octave'
  123. 4. Type 'inst-octave /clean'
  124.  
  125.  
  126. Installation
  127. ------------
  128.  
  129. Change to the directory of octave and run install (REXX must be installed!):
  130.  
  131. 1.  Type 'inst-octave /install':
  132.     The script make changes in the config.sys, .octaverc, .emacs and dir.
  133.     It unzips the scriptfiles, removes older emx-dlls, copies the info-files
  134.     to the INFO directory and creates an object on the desktop!
  135.     For all modified or deleted files it will create backups in the current
  136.     directory.
  137.  
  138.   **************************************************************************
  139.   **  BEFORE REBOOTING CONTROL THE CHANGES THIS SCRIPT WILL HAVE DONE     **
  140.   **  IN YOUR CONFIG.SYS!                                                 **
  141.   **************************************************************************
  142.   **  IF THERE IS SOMETHING WRONG PLEASE SEND ME A NOTE!                  **
  143.   **************************************************************************
  144.  
  145. 2.  If necessary the script will ask you to reboot. Do so.
  146.  
  147. 3.  To save disk space you can use 'inst-octave /clean'. All the files you
  148.     don't need for running octave are deleted. All backup files are also
  149.     removed.
  150.  
  151. The setup script modify the following parts of the config.sys, if necessary:
  152.  
  153.   PATH=...;h:\apps\science\octave-2.09;
  154.   LIBPATH=...;h:\apps\science\octave-2.09\dll;
  155. The directory you have Octave installed in:
  156.   SET OCTAVE_HOME=c:/octave
  157. Terminal type and a pointer to the TERMCAP.DAT file:
  158.   SET TERM=ansi
  159.   SET TERMCAP=h:/apps/science/octave-2.09/etc/termcap.dat
  160. Your home directory (place of your initialization files)
  161.   SET HOME=h:/.
  162. The name of the initialization file:
  163.   SET OCTAVE_INITFILE=octave.ini
  164. The directory for your info files:
  165.   SET INFOPATH=.;h:/apps/science/octave-2.09/doc
  166. The directory of Gnuplot:
  167.   SET GNUPLOT=h:/apps/science/gnuplot
  168.  
  169.  
  170. Running Octave
  171. --------------
  172.  
  173. When you start octave (without -f, --norc or --ignore-init-file), octave will
  174. execute the following files:
  175.  
  176. 1. scripts\startup\octaverc:
  177.   Octave will use the editor 'emacsclient' and the pager 'less'. The info
  178.   files are located using the environment variable INFOPATH and the
  179.   gnuplot_binary using the environment variable GNUPLOT.
  180.  
  181. 2. The file, which name is given by the environment variable OCTAVE_INITFILE,
  182.   or .octaverc, if there is no OCTAVE_INITFILE. Both are searched in your
  183.   HOME directory.
  184.  
  185. You can use octave as an external processor in an batch file, if the first
  186. line in the batch file is
  187.   extproc octave -q
  188. or
  189.   EXTPROC octave -q.
  190. This is the same as using octave -q file.cmd.
  191.  
  192.  
  193.  
  194. GNUPLOT
  195. -------
  196.  
  197. Octave uses GNUPLOT to display plots. I have tested octave with GNUPLOT 3.6
  198. (beta 315). The system-wide startup file octaverc in the directory
  199. scripts/startup reads the environment variable GNUPLOT and appends
  200. "/gnuplot.exe". This should be the path and name of GNUPLOT. So if the
  201. executable (gnuplot.exe) is in the directory h:\apps\science\gnuplot
  202. add the following line to your config.sys:
  203.  
  204.   SET GNUPLOT=h:/apps/science/gnuplot
  205.  
  206. You must use the beta of GNUPLOT because it supports multiple plots.
  207.  
  208.  
  209.  
  210. PAGER
  211. -----
  212.  
  213. If you want to use the less pager, you need the file less252-2.zip or newer.
  214. This less port does not use the termcap library, so it is unable to work with
  215. ansi-color-2, ansi-color-3,...
  216.  
  217. If you want to use ansi-color-3, you must recompile less after deleting
  218. termcap.c and adding the termcap-library in the makefile, or you must edit
  219. the file termcap.dat: Replace every tc=ansi in the termcap.dat by the lines
  220. following ansi.
  221.  
  222.  
  223.  
  224. EMACS
  225. -----
  226.  
  227. You can use emacs to edit the script files of octave. To do so add the lines 
  228.  
  229.   (setq load-path (append '("h:/apps/science/octave-2.09/lisp") load-path))
  230.   (autoload 'octave-mode "octave-mode" "Enter Octave mode." t)
  231.   (setq auto-mode-alist (cons '("\\.[Mm]$" . octave-mode) auto-mode-alist))
  232.   (defun my-octave-mode-hook ()
  233.     (setq fill-column 76)
  234.     (auto-fill-mode 1))
  235.   (setq octave-mode-hook 'my-octave-mode-hook)
  236.   (setq octave-prog-filename "h:/apps/science/octave-2.09/octave.exe")
  237.  
  238. to your .emacs.
  239.  
  240.  
  241. If you run emacs in server mode, octave can use the emacsclient for editing
  242. temporary files. Add the following lines to .emacs:
  243.  
  244.   (autoload 'octave-tmp-mode "octave-tmp-mode" "Enter Octave's tmp mode." t)
  245.   (setq auto-mode-alist
  246.     (cons '("[Oo][Cc][Tt]-....\\.[Tt][Mm][Pp]$" . tmp-mode)
  247.      auto-mode-alist))
  248.  
  249. The tmp mode is the normal text mode with one exception: If you finished
  250. editing by pressing C-x # the buffer is killed. So octave can delete the file.
  251.  
  252.  
  253. If you want to run Octave in a special shell mode under Emacs you must also
  254. add the following line to .emacs:
  255.  
  256.   (require 'octave)
  257.  
  258. There is also another octave shell mode, which is normally part of
  259. Octave. The file is called octave.el. I do not use it, because it created
  260. a lot of problems on my system AND it won't work correctly.
  261.  
  262. For example your .emacs file should look like this:
  263.  
  264.   (setq load-path (append '("h:/apps/science/octave-2.09/lisp") load-path))
  265.   (require 'octave)
  266.   (autoload 'octave-mode "octave-mode" "Enter Octave mode." t)
  267.   (setq auto-mode-alist (cons '("\\.[Mm]$" . octave-mode) auto-mode-alist))
  268.   (defun my-octave-mode-hook ()
  269.     (setq fill-column 76)
  270.     (auto-fill-mode 1))
  271.   (setq octave-mode-hook 'my-octave-mode-hook)
  272.   (setq octave-prog-filename "h:/apps/science/octave-2.09/octave.exe")
  273.   (autoload 'octave-tmp-mode "octave-tmp-mode" "Enter Octave's tmp mode." t)
  274.   (setq auto-mode-alist
  275.         (cons '("[Oo][Cc][Tt]-....\\.[Tt][Mm][Pp]$" . octave-tmp-mode)
  276.               auto-mode-alist))
  277.  
  278.  
  279.  
  280. Dynamic Loading of C++ Functions
  281. --------------------------------
  282.  
  283. This port now supports the dynamic loading. Use the script MAKE-OCTFILE to
  284. compile your scripts EVERY time you installed a new version of Octave! The
  285. script MAKE-OCTFILE is created by INST-OCTAVE.
  286.  
  287. For example:
  288.  
  289.   cd dlfcn\examples
  290.   make-octfile hello.cc
  291.  
  292. and add the path '.../dlfcn/examples' to Octave's LOADPATH; start Octave and
  293. type 'hello (1,2,3)'.
  294.  
  295. You can find examples in the directories '.../dlfcn/examples' and
  296. 'scripts/image/codecs'.
  297.  
  298.  
  299.  
  300. Images
  301. ------
  302.  
  303. Octave for OS/2 uses the excellent PM View 0.93. If you want to use a different
  304. viewer or if your PM View is installed in directory other then
  305. h:\apps\graphics\pmview, set the environment variable OCTAVE_IMAGE_VIEWER.
  306. You can use the environment variable OCTAVE_IMAGE_VIEWER_OPT for specifying
  307. command line options: For example:
  308.  
  309. SET OCTAVE_IMAGE_VIEWER=c:\pmview\pmview.exe
  310. SET OCTAVE_IMAGE_VIEWER_OPT=/WPos(,,,,ForAct)
  311.  
  312. For loading and saving images Octave uses now the DLFCN feature. Octave can
  313. read and write BMP, PNM, IMG formats and write Postscript.
  314.  
  315.  
  316.  
  317. MKFIFO
  318. ------
  319.  
  320. The mkfifo command is now supported! You can use Octave's mkfifo command
  321. to create a named pipe for communication with another program (local or
  322. in a LAN). There is also a utility called mkfifo, which can be used for
  323. creating, removing, listing named pipes, you have created with mkfifo.
  324. The names of the pipes must start with '\PIPE' or with '/PIPE'. If you want
  325. access to a pipe on another computer in your LAN you must prepend
  326. '\\HOSTNAME', where HOSTNAME stands for the name of the computer.
  327.  
  328. For example:
  329. 1) Start octave.
  330. 2) Open an OS/2 window.
  331. 3) Run mkfifo \PIPE\TEST
  332. 4) Type 'echo abcdef >\PIPE\TEST' in the OS/2 window
  333. 5) In Octave execute the following commands:
  334.    fid = fopen ("/PIPE/TEST", "r");
  335.    fgets (fid)
  336.    fclose (fid);
  337. 6) Run mkfifo -d \PIPE\TEST in the OS/2 window
  338.  
  339. To speed up the execution of the first mkfifo command you can add the
  340. following in your STARTUP.CMD:
  341.  
  342. detach [DRIVE:]\[PATH]\nmpserv --noexit
  343.  
  344.  
  345.  
  346.  
  347. Known Limitations, Modifications and Bugs
  348. -----------------------------------------
  349.  
  350. 1) fork is not supported, use spawn instead. Compare the script file popen2.m
  351.    with the original version (popen2.org).
  352.  
  353. 2) dup2 has been renamed to _dup2
  354.  
  355.  
  356.  
  357. Comments, Bugs, Problems, Ideas, ...
  358. ------------------------------------
  359.  
  360. If you have any problem installing or using this port, let me know!
  361.  
  362. If have any idea to make octave for OS/2 a better program, send me a mail.
  363. Also any comments are welcome.
  364.  
  365. And thanks for all your nice mails i received, and thanks to all of you
  366. helping me to remove the bugs.
  367.  
  368. My email addresses are:
  369.  
  370. INTERNET:    gebhardt@crunch.ikp.physik.th-darmstadt.de
  371. CompuServe:  100114,1371
  372.  
  373. **************************************************************************
  374. **        NO MAIL FROM INTERNET TO MY COMPUSERVE ADDRESS!               **
  375. **************************************************************************
  376.  
  377. Klaus Gebhardt [TEAM OS/2]
  378. Institut fuer Kernphysik
  379. Technische Hochschule Darmstadt
  380.